import jfRequest from "../../index";
import { IResultType } from "types/request";

// 维修配置列表
export function getOptionList(status: number) {
  return jfRequest.post<IResultType<any>>({
    url: "/api/v1/equipment/repairConfig/list?status=" + status,
  });
}

// 组织查询
export function getOrgList() {
  return jfRequest.get<IResultType<any>>({
    url: "/api/v1/common/getAdmOrgTreed",
  });
}

// 人员列表
export function getPersonList(data: any) {
  return jfRequest.post<IResultType<any>>({
    url: "/api/v1/common/getPersonListByOrganListWithPages",
    data
  });
}

// 新增维修配置
export function addOptions(data: any) {
  return jfRequest.post<IResultType<any>>({
    url: "/api/v1/equipment/repairConfig/add",
    data,
  });
}

// 编辑维修配置
export function editOption(data: any) {
  return jfRequest.put<IResultType<any>>({
    url: "/api/v1/equipment/repairConfig/edit",
    data,
  });
}